<?php

namespace rest\controllers;

use common\models\output\Response;
use Yii;
use yii\rest\ActiveController;

class RestController extends ActiveController {

    /**
     * 
     */
    public function init() {
        $this->modelClass = "common\models\db\Administrator";
    }

    /**
     * 
     * @param Response $resp
     * @param type $contentType
     * @return Response
     */
    public function response(Response $resp, $contentType = 'json') {
        Yii::$app->response->format = $contentType;
        return $resp;
    }

}
